<?php
namespace juven {
    \define('_JEXEC', '1');
    
    $entry_point = \dirname(__FILE__) . \DIRECTORY_SEPARATOR;
    \ob_start();

    $libsFolder = $entry_point.'protected'.\DIRECTORY_SEPARATOR.'libs'. \DIRECTORY_SEPARATOR;
    
    require_once $libsFolder.'ExceptionsManager.php'; 
    libs\ExceptionsManager::Init();
    require_once $libsFolder.'DynamicContainer.php';
    require_once $libsFolder.'Config.php';
    require_once $libsFolder.'Juven.php';
    require_once $libsFolder.'Autoloader.php'; 
    libs\Autoloader::Init($entry_point.'protected');
 
    $conf = new libs\Config();
    $conf->Init($entry_point.'protected'.\DIRECTORY_SEPARATOR.'config.php', $entry_point);
    unset($entry_point, $libsFolder);
    libs\ExceptionsManager::$inDebugMode = $conf->inDebugMode;
    libs\Juven::Init($conf);
    
    libs\juven::eventsManager()->publish(libs\User::EVENT_onGuestUserRequest(), new \stdClass());
    libs\juven::eventsManager()->publish(libs\User::EVENT_onFirstTimeVisitorRequest(), new \stdClass());
}
?>
